Optimal. Leaf size=90 \[ \frac {\left (8 a^2+8 a b+3 b^2\right ) \text {ArcTan}(\sinh (c+d x))}{8 d}+\frac {3 b (2 a+b) \text {sech}(c+d x) \tanh (c+d x)}{8 d}+\frac {b \text {sech}^3(c+d x) \left (a+b+a \sinh ^2(c+d x)\right ) \tanh (c+d x)}{4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 90, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {4232, 424, 393,
209} \begin {gather*} \frac {\left (8 a^2+8 a b+3 b^2\right ) \text {ArcTan}(\sinh (c+d x))}{8 d}+\frac {3 b (2 a+b) \tanh (c+d x) \text {sech}(c+d x)}{8 d}+\frac {b \tanh (c+d x) \text {sech}^3(c+d x) \left (a \sinh ^2(c+d x)+a+b\right )}{4 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 393
Rule 424
Rule 4232
Rubi steps
\begin {align*} \int \text {sech}(c+d x) \left (a+b \text {sech}^2(c+d x)\right )^2 \, dx &=\frac {\text {Subst}\left (\int \frac {\left (a+b+a x^2\right )^2}{\left (1+x^2\right )^3} \, dx,x,\sinh (c+d x)\right )}{d}\\ &=\frac {b \text {sech}^3(c+d x) \left (a+b+a \sinh ^2(c+d x)\right ) \tanh (c+d x)}{4 d}+\frac {\text {Subst}\left (\int \frac {(a+b) (4 a+3 b)+a (4 a+b) x^2}{\left (1+x^2\right )^2} \, dx,x,\sinh (c+d x)\right )}{4 d}\\ &=\frac {3 b (2 a+b) \text {sech}(c+d x) \tanh (c+d x)}{8 d}+\frac {b \text {sech}^3(c+d x) \left (a+b+a \sinh ^2(c+d x)\right ) \tanh (c+d x)}{4 d}+\frac {\left (8 a^2+8 a b+3 b^2\right ) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sinh (c+d x)\right )}{8 d}\\ &=\frac {\left (8 a^2+8 a b+3 b^2\right ) \tan ^{-1}(\sinh (c+d x))}{8 d}+\frac {3 b (2 a+b) \text {sech}(c+d x) \tanh (c+d x)}{8 d}+\frac {b \text {sech}^3(c+d x) \left (a+b+a \sinh ^2(c+d x)\right ) \tanh (c+d x)}{4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.10, size = 71, normalized size = 0.79 \begin {gather*} \frac {\left (8 a^2+8 a b+3 b^2\right ) \text {ArcTan}(\sinh (c+d x))+b (8 a+3 b) \text {sech}(c+d x) \tanh (c+d x)+2 b^2 \text {sech}^3(c+d x) \tanh (c+d x)}{8 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains complex when optimal does not.
time = 1.62, size = 218, normalized size = 2.42
method | result | size |
risch | \(\frac {b \,{\mathrm e}^{d x +c} \left (8 a \,{\mathrm e}^{6 d x +6 c}+3 b \,{\mathrm e}^{6 d x +6 c}+8 a \,{\mathrm e}^{4 d x +4 c}+11 b \,{\mathrm e}^{4 d x +4 c}-8 a \,{\mathrm e}^{2 d x +2 c}-11 b \,{\mathrm e}^{2 d x +2 c}-8 a -3 b \right )}{4 d \left (1+{\mathrm e}^{2 d x +2 c}\right )^{4}}+\frac {i \ln \left ({\mathrm e}^{d x +c}+i\right ) a^{2}}{d}+\frac {i b a \ln \left ({\mathrm e}^{d x +c}+i\right )}{d}+\frac {3 i b^{2} \ln \left ({\mathrm e}^{d x +c}+i\right )}{8 d}-\frac {i \ln \left ({\mathrm e}^{d x +c}-i\right ) a^{2}}{d}-\frac {i b a \ln \left ({\mathrm e}^{d x +c}-i\right )}{d}-\frac {3 i b^{2} \ln \left ({\mathrm e}^{d x +c}-i\right )}{8 d}\) | \(218\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 201 vs.
\(2 (84) = 168\).
time = 0.51, size = 201, normalized size = 2.23 \begin {gather*} -\frac {1}{4} \, b^{2} {\left (\frac {3 \, \arctan \left (e^{\left (-d x - c\right )}\right )}{d} - \frac {3 \, e^{\left (-d x - c\right )} + 11 \, e^{\left (-3 \, d x - 3 \, c\right )} - 11 \, e^{\left (-5 \, d x - 5 \, c\right )} - 3 \, e^{\left (-7 \, d x - 7 \, c\right )}}{d {\left (4 \, e^{\left (-2 \, d x - 2 \, c\right )} + 6 \, e^{\left (-4 \, d x - 4 \, c\right )} + 4 \, e^{\left (-6 \, d x - 6 \, c\right )} + e^{\left (-8 \, d x - 8 \, c\right )} + 1\right )}}\right )} - 2 \, a b {\left (\frac {\arctan \left (e^{\left (-d x - c\right )}\right )}{d} - \frac {e^{\left (-d x - c\right )} - e^{\left (-3 \, d x - 3 \, c\right )}}{d {\left (2 \, e^{\left (-2 \, d x - 2 \, c\right )} + e^{\left (-4 \, d x - 4 \, c\right )} + 1\right )}}\right )} + \frac {a^{2} \arctan \left (\sinh \left (d x + c\right )\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 1372 vs.
\(2 (84) = 168\).
time = 0.36, size = 1372, normalized size = 15.24 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \operatorname {sech}^{2}{\left (c + d x \right )}\right )^{2} \operatorname {sech}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 170 vs.
\(2 (84) = 168\).
time = 0.40, size = 170, normalized size = 1.89 \begin {gather*} \frac {{\left (\pi + 2 \, \arctan \left (\frac {1}{2} \, {\left (e^{\left (2 \, d x + 2 \, c\right )} - 1\right )} e^{\left (-d x - c\right )}\right )\right )} {\left (8 \, a^{2} + 8 \, a b + 3 \, b^{2}\right )} + \frac {4 \, {\left (8 \, a b {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )}^{3} + 3 \, b^{2} {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )}^{3} + 32 \, a b {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )} + 20 \, b^{2} {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )}\right )}}{{\left ({\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )}^{2} + 4\right )}^{2}}}{16 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.52, size = 303, normalized size = 3.37 \begin {gather*} \frac {\mathrm {atan}\left (\frac {{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c\,\left (8\,a^2\,\sqrt {d^2}+3\,b^2\,\sqrt {d^2}+8\,a\,b\,\sqrt {d^2}\right )}{d\,\sqrt {64\,a^4+128\,a^3\,b+112\,a^2\,b^2+48\,a\,b^3+9\,b^4}}\right )\,\sqrt {64\,a^4+128\,a^3\,b+112\,a^2\,b^2+48\,a\,b^3+9\,b^4}}{4\,\sqrt {d^2}}-\frac {6\,b^2\,{\mathrm {e}}^{c+d\,x}}{d\,\left (3\,{\mathrm {e}}^{2\,c+2\,d\,x}+3\,{\mathrm {e}}^{4\,c+4\,d\,x}+{\mathrm {e}}^{6\,c+6\,d\,x}+1\right )}+\frac {4\,b^2\,{\mathrm {e}}^{c+d\,x}}{d\,\left (4\,{\mathrm {e}}^{2\,c+2\,d\,x}+6\,{\mathrm {e}}^{4\,c+4\,d\,x}+4\,{\mathrm {e}}^{6\,c+6\,d\,x}+{\mathrm {e}}^{8\,c+8\,d\,x}+1\right )}+\frac {{\mathrm {e}}^{c+d\,x}\,\left (3\,b^2+8\,a\,b\right )}{4\,d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}+1\right )}-\frac {{\mathrm {e}}^{c+d\,x}\,\left (8\,a\,b-b^2\right )}{2\,d\,\left (2\,{\mathrm {e}}^{2\,c+2\,d\,x}+{\mathrm {e}}^{4\,c+4\,d\,x}+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________